package com.kinggm.service.factory.abs.impl;

import com.kinggm.service.factory.abs.Pizza;
import com.kinggm.service.factory.service.PizzaIngredientFactory;

public class ChinaPizza extends Pizza {

    public PizzaIngredientFactory ingredientFactory;

     public ChinaPizza(PizzaIngredientFactory ingredientFactory) {
        this.ingredientFactory = ingredientFactory;
    }

    @Override
    public void prepare() {
        System.out.println("准备"+ name);
        sauce = ingredientFactory.createSouce();
        clams = ingredientFactory.createClam();
        veggies = ingredientFactory.createVeggies();
        cheese = ingredientFactory.createCheese();
        dough = ingredientFactory.createDough();
        System.out.println("准备完成");
    }


}
